import request from '../request'

const Api = {
  page: '/api/adminmkt/mktChannel/page',
  remove: '/api/adminmkt/mktChannel/remove',
  removeBatch: '/api/adminmkt/mktChannel/removeBatch',
  save: '/api/adminmkt/mktChannel/save',
  details: '/api/adminmkt/mktChannel/selectById',
  update: '/api/adminmkt/mktChannel/update',
  upload: '/api/sys/oss/upload',
  student: '/api/adminstu/stuBusp/page',
  mainUser: '/api/sys/user/page',
  school: '/api/adminschool/school/page',
  mkurl: '/api/adminmkt/mktChannel/getMktChannelUrl',
}
// 单条删除
export const remove = params => {
  return request.request({
    url: Api.remove,
    params,
    method: 'DELETE'
  })
}
// 批量删除
export const removeBatch = params => {
  return request.request({
    url: Api.removeBatch,
    params,
    method: 'DELETE'
  })
}
// 分页查询
export const page = params => {
  return request.request({
    url: Api.page,
    params,
    method: 'GET'
  })
}
// 新增
export const save = data => {
  return request.request({
    url: Api.save,
    data,
    method: 'POST'
  })
}
// 修改
export const update = data => {
  return request.request({
    url: Api.update,
    data,
    method: 'PUT'
  })
}
// 查询详情
export const details = params => {
  return request.request({
    url: Api.details,
    params,
    method: 'GET'
  })
}
// 获取学生
export const student = params => {
  return request.request({
    url: Api.student,
    params,
    method: 'GET'
  })
}
// 负责人
export const mainUser = params => {
  return request.request({
    url: Api.mainUser,
    params,
    method: 'GET'
  })
}
// 获取学校
export const school = params => {
  return request.request({
    url: Api.school,
    params,
    method: 'GET'
  })
}
// 获取学校
export const upload = data => {
  return request.request({
    url: Api.upload,
    data,
    method: 'POST'
  })
}
// 获取二维码的链接
export const mkurl = params => {
  return request.request({
    url: Api.mkurl,
    params,
    method: 'GET'
  })
}
